#!/bin/sh
DOCKER_GPG=https://download.docker.com/linux/debian/gpg
DOCKER_DOWNLOAD=https://download.docker.com
updateApplication(){
	sudo apt update
	sudo apt upgrade
}
BaseToolsSetup(){
	sudo apt install vim zsh
}
DockerSetup(){
	sudo apt-get remove docker docker-engine docker.io containerd runc

	updateApplication

	sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

	curl -fsSL ${DOCKER_GPG} | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

	echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] ${DOCKER_DOWNLOAD}/linux/debian \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

	updateApplication

	sudo apt-get install docker-ce docker-ce-cli containerd.io
}
DokcerComposeSetup(){
	curl -L https://gitee.com/xiaoxt/compose-cli/raw/main/scripts/install/install_linux.sh | sh
}

setUp(){
	DockerSetup
	DokcerComposeSetup
	BaseToolsSetup
}
setUp